package com.haoxuer.discover.trade.data.entity;

import com.nbsaas.codemake.annotation.FormAnnotation;
import com.haoxuer.discover.data.entity.AbstractEntity;

import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import java.math.BigDecimal;


@FormAnnotation(title = "交易单")
@Entity
@Table(name = "sys_trade_info")
public class TradeInfo extends AbstractEntity {

  @ManyToOne(fetch = FetchType.LAZY)
  private TradeAccount from;

  @ManyToOne(fetch = FetchType.LAZY)
  private TradeAccount to;

  private BigDecimal amount;


  public TradeAccount getTo() {
    return to;
  }

  public void setTo(TradeAccount to) {
    this.to = to;
  }

  public BigDecimal getAmount() {
    return amount;
  }

  public void setAmount(BigDecimal amount) {
    this.amount = amount;
  }

  public TradeAccount getFrom() {
    return from;
  }

  public void setFrom(TradeAccount from) {
    this.from = from;
  }
}
